#include "includes/state_machine.h"

int state_lock;
STATE sm_state;

void sm_set_state( STATE new_state ){
	if( !state_lock )
		sm_state = new_state;
}

int sm_is_state( STATE eqState ){
	if( sm_state == eqState )
		return 1;
	return 0;
}

int sm_is_locked(){
	return state_lock;
}
void sm_lock(){
	state_lock = 1;
}
void sm_unlock(){
	state_lock = 0;
}
